package test;

public class test14StringBuilder {
    public static void main(String[] args) {
        StringBuilder sb=new StringBuilder();
        //添加元素
        sb.append("fdsjfhk ");
        sb.append(true );
        sb.append('a');
        sb.append(23);
        System.out.println(sb);
        //反转元素reverse
        sb.reverse();
        System.out.println(sb);
        //获取stringBuilder长度，length
        int le = sb.length();
        System.out.println(le);
        //将stringBuilder转换为string类型，toString
        String str = sb.toString();
        System.out.println(str);

    }
}
